import { useCookies } from '@vueuse/integrations/useCookies'

// 存储在Cookie中的Token的KEY
// const TOKEN_KEY = 'Authorization'
const TOKEN_KEY = 'admin-token'
const cookie = useCookies()


// 获取Token    
export function getToken() {
    return cookie.get(TOKEN_KEY)
}

// 设置Token
export function setToken(token) {
    return cookie.set(TOKEN_KEY, token)
}

// 清除Token
export function removeToken() {
    return cookie.remove(TOKEN_KEY)
}